class Fligh(object):
    def __init__(self,name):
        self.name = name

    def check_status(self):
        print('checking fligh %s status' % self.name)
        return 0

    @property
    def flige_status(self):
        status = self.check_status()
        if status == 1:
            print('fligh go canceled')
        elif status == 0:
            print('wei qi fei ')
        elif status == 2:
            print('到达')
        else:
            print('不可查')


    @flige_status.setter
    def flige_status(self,status):
        status_dic = {0: "canceled", 1: "arrived", 2: "departured"}
        print("\033[31;1mHas changed the flight status to \033[0m", status_dic.get(status))
f = Fligh('CA980')
f.flige_status
f.flige_status = 2